// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.ast.expr.SQLCharExpr;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "SQLBackupStatement.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../../../utils/listTran.h"
#include "../expr/SQLCharExpr.h"
#include "../SQLName.h"

SQLBackupStatement::SQLBackupStatement()
{
  properties = std::make_shared<std::list<SQLCharExpr_ptr>>();
}
// @Override
void SQLBackupStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLBackupStatement)))
  {
    acceptChild(visitor, this->type);
    acceptChild(visitor, this->action);
    SQLObject_list_ptr tmp = ListTran::tran_class<SQLCharExpr, SQLObject>(properties);
    acceptChild(visitor, tmp);
  }
  visitor->endVisit(SharedObject(SQLBackupStatement));
}

SQLName_ptr SQLBackupStatement::getType()
{
  return type;
}

void SQLBackupStatement::setType(SQLName_ptr type)
{
  this->type = type;
}

SQLName_ptr SQLBackupStatement::getAction()
{
  return action;
}

void SQLBackupStatement::setAction(SQLName_ptr action)
{
  this->action = action;
}

SQLCharExpr_list_ptr SQLBackupStatement::getProperties()
{
  return properties;
}
